<?
$enclosure = get_post_meta($post->ID, 'enclosure', true);
if ($enclosure):
$mp3 = split("\n", $enclosure);
    
if (!$mp3[2] || ($mp3[2] && ereg('audio',$mp3[2]))):
?>
<div class="tt-podcast-pane">
<h3>Play the Music</h3>
<div class="control">
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
        width="100%" 
        height="25" 
        id="mp3player" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" >
    <param name="movie" value="/wp-content/themes/tantan/mp3/mp3player.swf?config=/wp-content/themes/tantan/mp3/config.xml&file=<?=$mp3[0]?>" />
    <param name="wmode" value="transparent" />
    <embed src="/wp-content/themes/tantan/mp3/mp3player.swf?config=/wp-content/themes/tantan/mp3/config.xml&file=<?=$mp3[0]?>" 
        wmode="transparent" 
        width="100%" 
        height="25" 
        name="mp3player"  type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>
</div>    
<small class="meta">Audio MP3, <?=round($mp3[1] / 1048576, 1);?> MB, <a href="<?=$mp3[0]?>" class="mp3Download">Download</a></small>


<?
$purchases = get_post_meta($post->ID, 'purchase');
if (count($purchases) > 0):
?>
<h3>Buy the Music</h3>
<div class="links"><small>
<?
foreach ($purchases as $url):
$parts = parse_url($url);
?>

<a href="<?=$url?>"><?=$parts['host']?></a><br />
<?endforeach;?>
</small></div>

<?endif;?>

<p style="margin:10px 0 0 0">
<a href="http://feeds.feedburner.com/TanTanMusic" class="feed" title="Free full-length MP3 tracks delivered to your iPod">Subscribe to Music Podcast</a>
</p>

</div>        
        <?endif;?>
<?endif;?>